#include "log/log.h"
#include <pthread.h>
#include "app/app_common.h"

void *first_thread_func(void *arg)
{
    char cnt = 0;
    while (cnt++ > 10)
    {
        log_info("线程执行");
        sleep(1);
    }
}

int main(int argc, char const *argv[])
{
    pthread_t pt1;

    if (pthread_create(&pt1, NULL, first_thread_func, NULL) != 0)
    {
        log_error("线程创建失败");

        return;
    }
    log_info("线程创建成功");

    pthread_join(pt1,NULL);

    log_info("进程结束");

    return 0;
}